<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j">


<ui:composition template="/layout/template.xhtml">



	<ui:define name="body">




		<a:form id="calisanForm" ajaxSubmit="true" prependId="false">


			<h:panelGrid columns="3" id="allTabId">
				<a:commandButton id="tab1"
					value="#{tabsBean.tabsMap['tab1']?'true':'false'} Tab 1"
					actionListener="#{tabsBean.remove}" reRender="tab1">
					<a:actionparam name="value" value="#{!tabsBean.tabsMap['tab1']}" />
				</a:commandButton>

				<a:commandButton id="tab2"
					value="#{tabsBean.tabsMap['tab2']?'true':'false'} Tab 2"
					actionListener="#{tabsBean.remove}" reRender="tab2">
					<a:actionparam name="value" value="#{!tabsBean.tabsMap['tab2']}"/>
				</a:commandButton>

				<a:commandButton id="tab3"
					value="#{tabsBean.tabsMap['tab3']?'true':'false'} Tab 3"
					actionListener="#{tabsBean.remove}" reRender="tab3">
					<a:actionparam name="value" value="#{!tabsBean.tabsMap['tab3']}"/>
				</a:commandButton>
			</h:panelGrid>


		</a:form>

		<a:outputPanel ajaxRendered="true">
		
			<rich:tabPanel switchType="ajax" width="200px" id="tabs">
				<rich:tab label="Tab 1" rendered="#{tabsBean.tabsMap['tab1']}">
					Tab 1
				</rich:tab>
				<rich:tab label="Tab 2" rendered="#{tabsBean.tabsMap['tab2']}">
					Tab 2
				</rich:tab>
				<rich:tab label="Tab 3" rendered="#{tabsBean.tabsMap['tab3']}">
					Tab 3
				</rich:tab>
			</rich:tabPanel>
			
	   </a:outputPanel>

			<a:status onstart="#{rich:component('wait')}.show()"
				onstop="#{rich:component('wait')}.hide()" />
			<rich:modalPanel id="wait" autosized="true" width="200" height="120"
				moveable="false" resizeable="false">
				<f:facet name="header">
					<h:outputText value="#{messages['listesi.islemYapiliyor']}" />
				</f:facet>
				<h:outputText value="#{messages['listesi.lutfenBekleyiniz']}" />
			</rich:modalPanel>
	</ui:define>



</ui:composition>

</html>